import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建日期',
    align:"center",
    dataIndex: 'createTime',
    resizable:true
  },
  {
    title: '工厂',
    align:"center",
    dataIndex: 'factoryId_dictText',
    resizable:true
  },
  {
    title: '产品',
    align:"center",
    sorter: true,
    dataIndex: 'goodsNo_dictText',
    resizable:true
  },
  {
    title: '采购数',
    align:"center",
    sorter: true,
    dataIndex: 'arrivalNum',
    resizable:true
  },
  // {
  //   title: '单位',
  //   align:"center",
  //   dataIndex: 'unit'
  // },
  {
    title: '未到货数',
    align:"center",
    sorter: true,
    dataIndex: 'remainingNum',
    resizable:true
  },
  {
    title: '状态',
    align:"center",
    sorter: true,
    dataIndex: 'status_dictText',
    resizable:true
  },
];

//子表列表数据
export const productOrderDetailsColumns: BasicColumn[] = [
  {
    title: '主表单号',
    align:"center",
    dataIndex: 'productOrderId',
    resizable:true
  },
  {
    title: '入库单号',
    align:"center",
    dataIndex: 'orderNo',
    resizable:true
  },
  {
    title: '到货日期',
    align:"center",
    dataIndex: 'createTime',
    resizable:true
  },
  {
    title: '产品',
    align:"center",
    dataIndex: 'goodsNo_dictText',
    resizable:true
  },
  {
    title: '到货数量',
    align:"center",
    dataIndex: 'num',
    resizable:true
  },
  {
    title: '入库单总数',
    align:"center",
    dataIndex: 'orderNum',
    resizable:true
  },
];

// 高级查询数据
export const superQuerySchema = {
  factoryId: {title: '工厂',order: 0,view: 'sel_search', type: 'string',dictCode: 'p_factory_manage,name,code',},
  goodsNo: {title: '产品',order: 1,view: 'sel_search', type: 'string',dictTable: "goods_info", dictCode: 'goods_no', dictText: 'goods_name',},
  specNo: {title: '商品条码',order: 2,view: 'sel_search', type: 'string',dictTable: "goods_info_spec", dictCode: 'spec_no', dictText: 'spec_no',},
  arrivalNum: {title: '采购数',order: 3,view: 'number', type: 'number',},
  unit: {title: '单位',order: 4,view: 'text', type: 'string',},
  remainingNum: {title: '未到货数',order: 5,view: 'number', type: 'number',},
  status: {title: '状态',order: 6,view: 'list_multi', type: 'string',dictCode: 'supper_order_status',},
};
